1. Field of the Invention
The present invention is directed to methods and apparatus for monitoring and analyzing a video bitstream. More particularly, the present invention is directed to methods and apparatus for monitoring an MPEG video bitstream and providing metrics and analysis of the MPEG video bitstream at varying levels of detail based on the level of monitoring and analysis selected by a user. Levels of monitoring and analysis include monitoring the various characteristics and attributes of the MPEG video bitstream, testing for MPEG compliance and real-time decodability, and predicting the visual quality of decompressed video sequences contained in the MPEG video bitstream.
2. Discussion of the Related Art
The MPEG (Moving Picture Experts Group) standards are some of the most widely accepted digital video encoding standards and include MPEG-1 and MPEG-2 (MPEG-4 is still in development). MPEG-2 supports higher video quality at higher bit rates than MPEG-1, allows more options in encoding and decoding formats than MPEG-1, and is capable of handling existing MPEG-1 encoded bitstreams. MPEG-2 can also handle interlaced video and supports the scalable syntax, which allows an encoder to create enhancement layers that can both increase the quality and the spatial and temporal resolution of the motion picture. Such scalability is very useful in video applications involving telecommunications, video service with multiple qualities, video on ATM networks, and HDTV.
FIG. 1 illustrates a conventional MPEG (the term MPEG is used to denote MPEG-1 or MPEG-2, unless specifically noted otherwise) decoder 5. The decoder 5 includes a system decoder 10 that parses the MPEG bitstream and feeds separated audio and video bitstreams (containing compressed audio and video data), along with timing information, to an audio decoder 15 and a video decoder 20. The audio and video decoders 15, 20 then decode their respective audio and video bitstreams to provide output data.
As shown in FIG. 2, an MPEG video bitstream includes six layers: a video sequence layer, a group of pictures layer, a picture layer, a slice layer, a macroblock layer, and a block layer. In FIG. 2, those portions of the video sequence that are denoted parenthetically are optional. The upper level layers of an MPEG video bitstream differ, dependent upon whether the video sequence is an MPEG-1 video sequence or an MPEG-2 video sequence. Both MPEG-1 and MPEG-2 video sequences start with a sequence header and end in a sequence end code. The MPEG-1 sequence header is followed by at least one or more groups of pictures, each group of pictures starting with a group of pictures header and including at least one picture, with each picture starting with a picture header and including one or more slices. In contrast, the MPEG-2 sequence header is followed by sequence extension information, and therefore, an MPEG-2 video sequence is easily differentiated from an MPEG-1 video sequence. The sequence extension is followed by a GOP header (optional), one or more pictures and the sequence end code. As shown, the GOP header may be followed by user data (optional). Each picture includes a picture header, followed by picture coding extension information, extension and user data (optional) and at least one slice.
Regardless of whether the sequence is an MPEG-1 video sequence or an MPEG-2 video sequence, each slice is made up of one or more macroblocks. A macroblock is made up of several 8 by 8 Discrete Cosine Transform (DCT) coefficient blocks along with a number of other parameters, such as quantization scale code, motion vectors, etc. (See ISO/IEC Standard 13818-2). The number of blocks forming a macroblock can vary, dependent on whether the video sequence is MPEG-1 or MPEG-2. For MPEG-2, the number of blocks can also vary dependent on the chroma format. Each block contains quantized DCT coefficient values that are variable-length encoded. Further details concerning MPEG are widely available, including MPEG VIDEO COMPRESSION STANDARD, Joan L. Mitchell et al., Chapman & Hill, 1997, ISBN 0-412-08771-5, which is incorporated herein by reference.
A simplified functional diagram of a conventional video decoder 50 is illustrated in FIG. 3. Conventional video decoders are generally implemented as a `black box` in which the video decoder 50 receives a video bitstream and provides output video data. Within the black box, the decoder 50 decodes the video bitstream on a macroblock-by-macroblock basis by performing the following operations. First, the video decoder performs Inverse Variable Length Coding (IVLC) to expand the variable-length encoded data. Then, the video decoder dequantizes the quantized DCT coefficients (termed Inverse Quantization of DCT coefficients (IQDCT)) based on the appropriate quantization tables (matrices) and the quantization scale to reconstruct (as near as possible) DCT coefficients. Next, the video decoder performs Inverse DCT (IDCT) calculations and motion compensation to reconstruct the pixel data, which is provided as output video data at the appropriate time.
Because the MPEG standards have been so widely accepted and their use so varied, and because many different vendors make or sell MPEG products, there is a significant need to both monitor and analyze the quality of an MPEG bitstream to verify at least minimal conformance with the standards. Due to the greater bandwidth demands of the video bitstream versus the audio bitstream, this need is particularly acute with respect to the MPEG video bitstream. For example, designers of MPEG video encoders want to know that their output is MPEG compliant, while designers of MPEG video decoders want to know whether the data they are using to develop and test their design is, in fact, compliant with the standard. Furthermore, although the MPEG video syntax is specified in the standards, subtle differences in interpretation of the standards can exist while still conforming to the standard, and therefore inter-operability problems are almost inevitable. Accordingly, designers of both encoders and decoders need a tool to analyze an MPEG video bitstream and isolate inter-operability problems.
Beyond this level of monitoring and quality analysis, there is also a need to provide information and quality analysis relating to those parameters over which designers of MPEG encoders have some choice. These parameters may or may not be optimal, dependent on the particular encoding process used and the underlying video material that was encoded. Such information and quality analysis can provide feedback to help designers develop more efficient encoding algorithms that optimize picture quality for a given number of bits.
There is also a need to monitor and assess the quality of the resulting video output data as it is seen after it has been received and decoded by an MPEG video decoder. This information is useful to designers of MPEG encoders as well as to broadcasters of MPEG transmissions. For example, a broadcasting station could use the information to save bandwidth if the quality of the video output data was higher than necessary, and to increase the bandwidth of the transmitted signal if the quality of video output data was poor. Although conventional systems are available to assess the quality of video output data after encoding and decoding processes, these systems rely on a comparison of the decoded output video data to the original input video data. This sort of comparison is computationally expensive inasmuch as it requires the full decoding of the received video bitstream and a bit-by-bit comparison with the input data. The time required for such a bit-by-bit analysis can be prohibitive. In addition, from a decoding point of view, the original input video data may simply not be available to the recipient of the MPEG bitstream.